package com.ldw.handler;


import com.ldw.vo.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

//对加了@Controller注解的方法进行处理拦截AOP实现
/*@ControllerAdvice
public class AllExceptionHandler {

    //进行异常处理，处理Exception。class异常
    @ExceptionHandler(Exception.class)
    @ResponseBody
    public Result doException(Exception ex) {
        ex.printStackTrace();
        return Result.fail(999, "系统异常");
    }
}*/
